function openMapFrame(name) {
  var div = $('frame_' + name);
  var iframe = $('iframe_' + name);
  if (!div || !iframe) return;
  iframe.src = 'map.php?id=' + name;
  Effect.SlideDown(div);
  var a = $('a_' + name);
  a.onclick = function() {closeMapFrame(name);};
}

function closeMapFrame(name) {
  var div = $('frame_' + name);
  Effect.SlideUp(div);
  var a = $('a_' + name);
  a.onclick = function() {openMapFrame(name);};
}
